home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20031118-20041115
/
000027_fdc@columbia.edu_Mon Dec 1 11:43:53 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!not-for-mail
From: Frank da Cruz <fdc@columbia.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Problem in Kermit trying to get a file while sending it at the same time
Date: 1 Dec 2003 16:43:26 GMT
Organization: Columbia University
Lines: 48
Message-ID: <slrnbsmrte.pqg.fdc@sesame.cc.columbia.edu>
References: <f0bb0f39.0311250532.1b93aad@posting.google.com> <slrnbs6r9i.oig.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311260731.11d9eb29@posting.google.com> <f0bb0f39.0311261025.6fd175b5@posting.google.com> <slrnbsa0at.dm1.fdc@sesame.cc.columbia.edu> <f0bb0f39.0312010625.7751d0a7@posting.google.com>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1070297006 13666 128.59.59.56 (1 Dec 2003 16:43:26 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 1 Dec 2003 16:43:26 GMT
User-Agent: slrn/0.9.7.4 (SunOS)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14703
In article <f0bb0f39.0312010625.7751d0a7@posting.google.com>,
newexpectuser wrote:
:
: (quoting from http://www.columbia.edu/kermit/ftpscripts.html):
:
: "...Now we can move the uploaded file from the server's working directory
: to its ready directory (the syntax assumes a UNIX-like file system on
: server):
:
: ftp rename \m(nameonly) ../ready/\m(nameonly)"
:
: This solves my problem if I have a partial file, it will be transfered
: into a directory (working) where my central-site server won't be
: looking for it. Once this file has been dropped off 100%, then the
: next time around I run to send files, I will then pickup a full file
: in my working directory.
:
: What I don't understand is with the above "ftp rename \m(nameonly)
: ../ready/\m(nameonly)", how does this avoid moving the partial file
: from the working directory to the ready directory, there will still be
: a file in the working directory albeit a partial file and this command
: will move it along to the ready directory.
:
The lines preceding the "ftp rename" command are:
ftp put /delete \m(filename)
if fail exit 1 ftp put \m(filename): \v(ftp_message)
Thus the "ftp rename" command won't be reached if "ftp put" fails.
This is exactly the reason that we recommend that each critical step
be checked with IF FAIL -- you don't want the script to proceed in
cases where the subsequent commands require the preceding ones to
succeed.
Of course conditional command in the IF statement need not be EXIT; it
can be anything you want, even a series of commands, e.g.:
if fail {
command1
command2
...
} else { ; The ELSE part is optional
command1
command2
...
}
- Frank